﻿using System;

namespace Sudoku.DocComments
{
	/// <summary>
	/// Deconstruct the instance to multiple values, which allows you use the value tuple syntax
	/// to get the properties from an instance like:
	/// <code>
	/// var (variable1, variable2, variable3) = instance;
	/// </code>
	/// or like
	/// <code>
	/// (int variable1, double variable2, string? variabl3) = instance;
	/// </code>
	/// </summary>
	/// <remarks>
	/// <para>
	/// The method should be declared manually when the type is a normal <see langword="struct"/>
	/// or <see langword="class"/>. If the method is in a <see langword="record"/>
	/// (or a <see langword="record struct"/>), the deconstruct method will be generated
	/// by the compiler automatically and returns <b>all properties</b>
	/// to those <see langword="out"/> parameters.
	/// </para>
	/// <para>
	/// Please note: If the deconstruct method is automatically generated by the compiler,
	/// you can't create a deconstruct method manually with the same number of the parameters
	/// than that auto method; otherwise, the method can't be called normally.
	/// </para>
	/// <para>
	/// In addition, the deconstruct methods can take <b>more than</b> 8 <see langword="out"/> parameters,
	/// although a normal <see cref="ValueTuple"/> can only contain at most 8 parameters.
	/// </para>
	/// </remarks>
	/// <seealso cref="ValueTuple"/>
	public sealed class DeconstructMethod
	{
	}
}
